package com.mz.common.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author: soulcoder
 * @datetime:  20200615 23:11
 * @description: TODO
 */
@Data
@Table(name = "sys_menu")
public class SysMenu {
    @Id
    @Column(name = "id")
    private Long id;
    @Column(name = "create_by")
    protected Long createBy;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "create_date")
    protected Date createDate;
    @Column(name = "update_by")
    protected Long updateBy;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "update_date")
    protected Date updateDate;
    protected String remarks;
    @Column(name = "del_flag")
    protected Integer delFlag;
    protected transient Map<String, String> sqlMap =  new HashMap<>();

    public static final Integer DEL_FLAG_NORMAL = 0;
    public static final Integer DEL_FLAG_DELETE = 1;

    protected Boolean hasAdmin;
    @Column(name = "parent_id")
    protected Long parentId;
    @Column(name = "parent_ids")
    protected String parentIds;
    @Column(name = "name")
    protected String name;
    protected Integer sort;
    protected List children;
    private String type;
    private String target;
    private String icon;
    @Column(name = "is_show")
    private Integer hasShow;

    private String permission;


}
